Integrand size = 25, antiderivative size = 78 \[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=-\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{\sqrt {a-b} f}-\frac {\cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{a f} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3751, 491, 12, 385, 209} \[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=-\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f \sqrt {a-b}}-\frac {\cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{a f} \]
[In]
[Out]
Rule 12
Rule 209
Rule 385
Rule 491
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^2 \left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{a f}-\frac {\text {Subst}\left (\int \frac {a}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{a f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{a f}-\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{a f}-\frac {\text {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f} \\ & = -\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{\sqrt {a-b} f}-\frac {\cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{a f} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 6.69 (sec) , antiderivative size = 179, normalized size of antiderivative = 2.29 \[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=-\frac {2 \cos ^2(e+f x) \cot (e+f x) \left (1+\frac {b \tan ^2(e+f x)}{a}\right ) \left (2 (a-b) \operatorname {Hypergeometric2F1}\left (2,2,\frac {5}{2},\frac {(a-b) \sin ^2(e+f x)}{a}\right ) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )+\frac {3 a \arcsin \left (\sqrt {\frac {(a-b) \sin ^2(e+f x)}{a}}\right ) \left (a+2 b \tan ^2(e+f x)\right )}{\sqrt {\frac {(a-b) \sin ^2(2 (e+f x)) \left (a+b \tan ^2(e+f x)\right )}{a^2}}}\right )}{3 a^2 f \sqrt {a+b \tan ^2(e+f x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(251\) vs. \(2(70)=140\).
Time = 4.72 (sec) , antiderivative size = 252, normalized size of antiderivative = 3.23
method | result | size |
default | \(\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) a +\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) a \sec \left (f x +e \right )-\sqrt {a -b}\, b \tan \left (f x +e \right )-\sqrt {a -b}\, a \cot \left (f x +e \right )}{f a \sqrt {a -b}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\) | \(252\) |
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 289, normalized size of antiderivative = 3.71 \[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\left [-\frac {a \sqrt {-a + b} \log \left (-\frac {{\left (a^{2} - 8 \, a b + 8 \, b^{2}\right )} \tan \left (f x + e\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \left (f x + e\right )^{2} + a^{2} + 4 \, {\left ({\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{3} - a \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right ) + 4 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a - b\right )}}{4 \, {\left (a^{2} - a b\right )} f \tan \left (f x + e\right )}, -\frac {\sqrt {a - b} a \arctan \left (-\frac {2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} \tan \left (f x + e\right )}{{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} - a}\right ) \tan \left (f x + e\right ) + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a - b\right )}}{2 \, {\left (a^{2} - a b\right )} f \tan \left (f x + e\right )}\right ] \]
[In]
[Out]
\[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int \frac {\cot ^{2}{\left (e + f x \right )}}{\sqrt {a + b \tan ^{2}{\left (e + f x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )^{2}}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )^{2}}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cot ^2(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int \frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}} \,d x \]
[In]
[Out]